package com.lyz.oss.core;

import com.amazonaws.services.s3.model.Bucket;
import com.amazonaws.services.s3.model.PutObjectResult;
import com.amazonaws.services.s3.model.S3Object;
import com.amazonaws.services.s3.model.S3ObjectSummary;

import java.io.InputStream;
import java.util.List;

public interface OssTemplate {


    void createBucket(String bucketName);
    List<Bucket> allBuckets();
    void removeBucket(String bucketName);
    PutObjectResult putObject(String bucketName, String objectName, InputStream stream,String contextType);
    PutObjectResult putObject(String bucketName, String objectName, InputStream stream);
    S3Object object(String bucketName, String objectName);
    String objectUrl(String bucketName, String objectName, Integer expires);
    void removeObject(String bucketName, String objectName);
    List<S3ObjectSummary> allObjectsByPrefix(String bucketName, String prefix, boolean recursive);
}
